package com.smart_campus.bus.mapper;

import com.smart_campus.bus.vo.CommentVo;
import com.smart_campus.bus.domain.Comment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
@Transactional
public interface CommentMapper {

    List<CommentVo> selComment(CommentVo commentVo);//查询全部评论

    List<CommentVo> selCommentByJournalId(int jid);//根据文章id查找评论

    Boolean delCommentById(@Param("id") Integer id);//根据id删除

    Boolean writeComment(Comment comment);//用户写评论

    List<Comment> selbyid(Integer id);//根据评论主id查找pid相等的评论

    Comment getNewComment();
}
